Skip to content

Conversation

@mert-kurttutan
Copy link
Contributor

No description provided.

@mert-kurttutan
Copy link
Contributor Author

THis implements subgraph feature using the algorithm defined in the paper by Sander.

It looks pretty good for graphs I tried with claude

Sander's paper: https://publikationen.sulb.uni-saarland.de/bitstream/20.500.11880/25862/1/tr-A03-96.pdf

@mert-kurttutan
Copy link
Contributor Author

There is couple issues regarding public api changes. Due to addition of subgraph feature, one needs to specify subgraph in which the node is located.

We can do this via two ways
a) Keep the public api consistent and add new methods that accommodates subgraph feature with new signature.
b) Change the public api so that subgraphs are inherent in the methods

More precisely,
a) fn new_node(elem) -> fn new_node(elem) // this would implicility insert into main graph, fn new_node_with_sg(elem, subgraph_idx: SubgraphHandle)
b) fn new_node(elem) -> fn new_node(elem, subgraph_idx: SubgraphHandle)

Copy link
Contributor

@azriel91 azriel91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heya! I tried this out on the html-subgraph branch, and hit a case where the code panics from invalid user input (a subgraph with no nodes).

I could make sure not to send in invalid input, though I wonder if we should handle it here

@mert-kurttutan
Copy link
Contributor Author

heya! I tried this out on the html-subgraph branch, and hit a case where the code panics from invalid user input (a subgraph with no nodes).

I could make sure not to send in invalid input, though I wonder if we should handle it here

Thanks for catching this. I implicitly assumed this in several places. (essentially due to logical continuation from the paper and the position of subgraph being determined by its child nodes)

@mert-kurttutan
Copy link
Contributor Author

mert-kurttutan commented Oct 20, 2025

  • Addresses the issue of empty graph and added some tests.
  • Also pushed the changes to html-subgraph branch in my fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants